<include file="Public/header" />
<style>
  .fileUpload {
  position: relative;
  overflow: hidden;
  margin: 10px;
}

.fileUpload input.upload {  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  filter: alpha(opacity=0);
}
</style>
    <!-- 主体 -->
    <div class="row" style="width:80%; margin:5px auto;">
      <!-- 左侧菜单 -->
      <div class="col-sm-3">
        <div class="sidebar-module">
          <ul class="nav nav-list">
            <li class="nav-header">功能列表</li>
            <li ><a href="{:U('/Admin/Arts/artadd')}">写文章</a></li>
            <li><a href="{:U('/Admin/Cat/cat')}">管理分类</a></li>
            <li><a href="#">帮助</a></li>
            <li><a href="#">帮助</a></li>
            <li class="nav-header">列表标题</li>
            <li class="active"><a href="#">首页</a></li>
            <li><a href="#">库</a></li>
            <li><a href="#">应用</a></li>
          </ul>
        </div>
      </div>
      <!-- 右侧添加文章 -->
      <div class="col-sm-8 col-sm-offset-1">
        <form action="{:U('/Admin/Arts/artAdd')}" method="post" class="form-group" enctype="multipart/form-data" >
          <div class="input-group input-group-lg" style="margin-bottom:10px;">
            <span class="input-group-addon">标题：</span>
            <input type="text" name="title"class="form-control" value="{$art['title']}">
          </div>
          <div class="form-group">栏目：
            <select name="cat_id" id="">
              <foreach name="cats" item="cats">
              <li role="presentation">
                <option value="{$cats['cat_id']}"
                  <if condition="$cats['cat_id'] eq $art['cat_id']">
                    selected="selected"
                  </if>
                >{$cats[cat_name]}</option>
              </li>
              </foreach>
            </select>
          </div>
          <div class="form-group"> 
            <p>描述</p>
            <textarea class="form-control" name="brief" rows="3">{$art['brief']}</textarea> 
          </div>
          <div class="form-group"> 
            <p>正文</p>
            <textarea class="form-control" name="content" rows="20">{$art['content']}</textarea> 
          </div>
          <div class="input-group" style="margin-bottom:10px;">
            <span class="input-group-addon">作者：</span>
            <input type="text" name="author" class="form-control" value="{$art['author']}">
          </div>          
          <div class="input-group" style="margin-bottom:10px;">
            <span class="input-group-addon">标签：</span>
            <input type="text" name="lable" class="form-control" value="{$art['lable']}">
          </div>
          <div class="fileUpload btn btn-primary">
              <span >重新配图</span>
            <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
              <input type="file" class="upload" name="img_path"/>
          </div>
            <input class="btn btn-primary" type="submit" value="确定修改">
        </div>
      </form>
    </div>
<include file="Public/footer" />